<div class="form-inline">        
    <input type="text" name="nome" class='span3' placeholder="Responsável">
    <input type="text" name="msg" class='span4' placeholder="Conteúdo da mensagem">
    <input type="text" name="data" class='span2' placeholder="Data" onfocus="showCalendarControl(this);" >
    <input type="submit" name="btnBuscar" value="Buscar" class='btn'>
</div>

<br>

<table class="table table-striped table-bordered table-hover">

    <tr>
        <th width='100'>Ações</th>
        <th width='20'>Nº</th>
        <th width='90'>Data / Hora</th>
        <th>Relatório / Pessoas Envolvidas</th>
        <th width='100'>Local</th>
        <th width='250'>Relator</th>
    </tr>

    <?php
    $sql = "SELECT * FROM relprev WHERE $onde ORDER BY rel_id DESC";
    $res = sql($sql);
    $i=0;
    while($linha = mysql_fetch_array($res)) {
    ?>

    <tr>
        <td>
            <input name="excluir[]" type="checkbox" value="<?=$linha['rel_id'];?>"/><i class="icon-trash"></i> Excluir&nbsp;&nbsp;|&nbsp;
            <a href="?pag=relprev_alt&rel_id=<?=$linha['rel_id'];?>"><i class="icon-pencil"></i> Editar</a>
        </td>
        <td><strong><?=$linha['rel_id'];?></strong></td>
        <td><?=todatabr($linha['rel_data'])."<br>{$linha['rel_hora']} h";?></td>
        <td>
         
            <?php
            echo "<a href='#detalherelprev$i' data-toggle='modal' title='Clique e veja mais detalhes'>".substr($linha['rel_msg'],0,100)." ...</a><a href='#detalherelprev$i' title='Detalhes' data-toggle='modal' class='icon-edit pull-right'></a>";
            echo "<hr>";
            echo $linha['rel_membro'];
            include "mod/detalherelprev/index.php"; 
            ?>
            
        </td>
        <td><?=$linha['rel_local'];?></td>
        <td><?="{$linha['rel_relator']}<br>{$linha['rel_contato']}";?></td>
    </tr>

    <?php
    $i++;
    } 
    ?>
</table>
